package com.zenika.zenbinding.client.validator;

import com.google.gwt.core.client.JavaScriptObject;

public class RegExp extends JavaScriptObject {

	protected RegExp() {
		super();
	}

	public static native RegExp create(String exp)/*-{
		        return new $wnd.RegExp(exp);
		    }-*/;

	public final boolean test(String sToMatch) {
		return test(this, sToMatch);
	}

	private static native boolean test(RegExp self, String sToMatch)/*-{
		        return self.test(sToMatch);
		    }-*/;

}
